1. Technical Field
The present invention relates to edit fields as well as non-edit fields, such as check boxes, list boxes, and radio button groups, provided with a Graphical User Interface (GUI) allowing computer users to interact with running programs. More particularly, the present invention relates to programmatically setting up or modifying a GUI.
2. Related Art
GUIs are a primary way computer users interact with running programs. Many familiar programs use GUIs, e.g., Microsoft Word, Quicken, Internet Explorer, and Excel. GUIs contain graphical elements, called controls, with which the user interacts in order to provide input to the program. Examples of the GUI controls are check boxes, list boxes, radio buttons, and edit fields that are all illustrated in the selection menu shown in FIG. 1. The GUI of FIG. 1 is used to set parameters for an adder/subtractor in a high-level modeling system.
Each type of GUI control is suited to a particular type of input. A check box 2, for example, displays a setting that can be checked (set) or unchecked (not set) allowing one of two opposing choices. The check box is ideal when a program wants a Boolean type input from the user, such as a choice such as between on/off, hot/cold, large/small, or whether a carry input or carry output is provided as shown in FIG. 1. Radio boxes 4 provide a greater number of choices than the check box, with only one of the buttons being selectable at a time. The radio boxes 4 shown in FIG. 1 enable selection of one of the options of truncating or rounding the output of an adder. A list box 6, similar to the radio box, displays a list of choices, allowing the user to highlight and select one of the choices. The list box 6 shown in FIG. 1 includes a drop down menu that can be accessed by clicking the down arrow, enabling a user to highlight one of the possible selections before typing a return to activate the highlighted selections. Check boxes, radio boxes and list boxes provide selection capability, but not the capability of editing an arbitrary input.
In contrast, edit fields, such as edit field 8 in FIG. 1, are suited to situations where a program does not want to constrain user input, or only constrain it to a small degree. The edit field 8 in FIG. 1 allows a user to input the amount of clock cycles of latency desired for the adder/subtractor. The user can insert a number such as the number 2 shown, or another number such as 8, 23 or 41. Other examples of edit fields are the address line in a web browser and the formula bar in an Excel spread sheet.
FIG. 2 shows a further example of a GUI, the print GUI from Microsoft Word. The GUI of FIG. 2, similar to FIG. 1, contains non-edit fields such as radio boxes 20, list boxes 21-25 and a check box 26. The GUI of FIG. 2 further contains edit fields 28-29. As with FIG. 1, the edit fields in FIG. 2 allow a user to enter data, such as the number shown indicating a number of pages or a number of copies desired. Literals like “22” or “hello”, etc. can be entered in the dialog box 28, that are not interpreted by system software. Unlike the “literals” entered in the edit field 28 of FIG. 2, “expressions” can be entered in the edit field 29 that are interpreted by software. “Expressions”, like a listing of pages 2, 7 and 14 in the edit field 29, allowing a selection of several pages to be printed at one time, are more complex and, thus, distinguishable from “literals”.
FIG. 3 show yet another example of a GUI, the Environment Variables control panel from Microsoft Windows. The Environment Variables GUI control panel includes environment variables 31-32 that can be set by expression values entered in the edit fields 41-42. The language of the “expression” values 41-42 being interpreted in FIG. 3 are significantly more complex than the “literals” used in edit field 28 of FIG. 2, allowing, users to define parameters to set environment variables 31-32.
The GUI examples shown in FIGS. 1-3 provide three examples among many examples of GUIs used by software systems that include edit and non-edit fields. Non-edit fields, as referenced herein, are non-editable in the sense that a user can only change the state of the field, whereas in an edit field a user can enter a variable or expression.
The example of FIG. 1 is from a high-leveling modeling system that is the combined MATLAB and Simulink, both made by MathWorks, Inc., allow modeling of components of a Digital Signal Processor (DSP). System Generator for Digital Signal Processors (DSPs) by Xilinx, Inc. of San Jose, Calif. is further used to automatically translate a DSP system developed using MATLAB and Simulink software into highly optimized hardware description models and intellectual property (IP) cores or modules that are programmed into Xilinx Field Programmable Gate Arrays (FPGAs).
For reference in understanding the GUI of FIG. 1, a block diagram of components of a conventional FPGA is shown in FIG. 4. The FPGA includes input/output (IOBs) blocks 52 (each labeled IO) located around the perimeter of the FPGA, multi-gigabit transceivers (MGT) 54 interspersed with the I/O blocks 52, configurable logic blocks 56 (each labeled CLB) arranged in an array, block random access memory 58 (each labeled BRAM) interspersed with the CLBs, configuration logic 62, configuration interface 64, on-chip processor 66 and an internal configuration access port (ICAP) 40. The FPGA also includes other elements, such as a programmable interconnect structure and a configuration memory array, which are not illustrated in FIG. 4.
In general, the FPGA of FIG. 4 is programmed in response to a set of configuration data values that are loaded into a configuration memory array of the FPGA. The internal configuration memory cells define how the CLBs 56, IOBs 52, BRAMs 58 and interconnect structure are configured. Configuration data is provided to the configuration memory cells as a bitstream from an external memory (e.g., an external PROM) via configuration interface 64 and configuration logic 62. As another alternative, the FPGA can be reconfigured by rewriting data in the configuration memory array using the ICAP 60.
As one example of programming a module into FPGA, a CLB 56 can be configured to form an Adder/Subtractor. The Adder/Subtractor is created as one of a number of modules using the MATLAB and Simulink software. The GUI shown in FIG. 1 enables parameters to be set, such as latency for the adder and whether a carry is used. System Generator interacts with MATLAB and Simulink so that GUIs are presented to a user to set necessary parameters. For example, if a System Generator user wants to set the number of bits that should result from an addition operation, the user opens a MATLAB and Simulink GUI containing an edit field in which to enter the desired number of bits, e.g. 64.
A convenient feature of edit fields in MATLAB is that it allows a user to express the same information in a variety of ways. Instead of entering 64 in the edit field for number of output bits, the user could equally well enter 2^6 (26). MATLAB further has the ability to interpret a programming language known as m-code, and users can enter any valid m-code expression into an edit field, including function calls. The m-code enables a user, for example, to make the number of output bits in the previous example of an adder depend on virtually anything: the precision of a preceding multiply, the size of FPGA being used, or the day of the week. This expressive ability in an edit field provides a significant benefit to System Generator.
MATLAB is not the only program that permits expressions in edit fields, as shown with the GUIs of FIGS. 2 and 3. As a further example, the Microsoft Word print dialog shown in FIG. 2 allows a user to enter a comma-separated list of pages in the Microsoft Word print dialog. E.g., if a user wants to print pages 5, 7 and 22, the user can enter “5, 7, 22” in the “Pages:” edit field. As a further example, Microsoft Excel allows users to enter complex interpreted expressions in edit fields throughout the program.
It would be desirable to provide GUIs with fields enabling even more user versatility in interfacing with a program, either in a combined Matlab and Simulink high-level modeling program, or other programs like Microsoft Word and Microsoft Windows.